package cn.jsj.dao;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;

import org.hibernate.criterion.Restrictions;

import cn.jsj.pojo.TblCaseInfo;

/**
 * 案件信息处理类
 * @author LI
 *
 */
public class TblCaseInfoDAO {

	/**
	 * 获得所有的案件信息条数
	 * @param:userId:律师ID，如果非律师则为0
	 * @return：案件信息条数
	 */
	public int getCaseInfoNumber(int userId){

		org.hibernate.Session session = HBUtils.getSession();
		// 新建事务对象
		org.hibernate.Transaction tx = session.beginTransaction();
		// 开始事务
		tx.begin();
		List result;
		if(userId==0){
		 result=session.createCriteria(TblCaseInfo.class)
		.add(Restrictions.eq("deleteLabel", 0))
		.list();
		}else{
			 result=session.createCriteria(TblCaseInfo.class)
			 	.add(Restrictions.eq("undertakeLawyer", userId))
				.add(Restrictions.eq("deleteLabel", 0))
				.list();
		}
		// 提交事务
		tx.commit();
		session.close();
		return result.size();
	}


	/**
	 * 获得指定页面案件信息数
	 * @param startNumb：从第几条开始
	 * @param totalNumb：一页显示几条
	 * @param userId:律师id，如果非律师则为0
	 * @return：案件信息队列
	 */
	public java.util.List<cn.jsj.pojo.TblCaseInfo> getPageCaseInfo(int startNumb,int totalNumb,int userId){
		org.hibernate.Session session = HBUtils.getSession();
		// 新建事务对象
		org.hibernate.Transaction tx = session.beginTransaction();
		// 开始事务
		tx.begin();
		List result;
		if(userId==0){
		result=session.createCriteria(TblCaseInfo.class)
		 .addOrder(org.hibernate.criterion.Order.desc("courtDay"))
		.setFirstResult(startNumb)
		.setMaxResults(totalNumb)
		.add(Restrictions.eq("deleteLabel", 0))
		.list();
		}else{
			result=session.createCriteria(TblCaseInfo.class)
			 .addOrder(org.hibernate.criterion.Order.desc("courtDay"))
			.add(Restrictions.eq("undertakeLawyer", userId))
			.setFirstResult(startNumb)
			.setMaxResults(totalNumb)
			.add(Restrictions.eq("deleteLabel", 0))
			.list();
		}
		// 提交事务
		tx.commit();
		session.close();
		return result;
	}

	/**
	 * 获得指定条件下所有的案件信息条数
	 * @return：案件信息条数
	 */
	public int getTheCaseInfoNumber(String contractName,Date signTimeS,Date signTimeE,String undertakeLawyer,int userId ){

		org.hibernate.Session session = HBUtils.getSession();
		// 新建事务对象
		org.hibernate.Transaction tx = session.beginTransaction();
		// 开始事务
		tx.begin();
		//暂存队列
		List result=new java.util.LinkedList();

		//如果为行政人员
		if(userId==0){
		for(int i=0;i<2;i++){
		//合同号不为NULL
		if(contractName.length()!=0){
		 result=session.createCriteria(TblCaseInfo.class)
		 .add(Restrictions.eq("contractNumber", contractName))
		.add(Restrictions.eq("deleteLabel", 0))
		.list();
		 break;
		}

		//如果时间不为NULL与承办律师不为NULL
		if(signTimeS!=null&&signTimeE!=null&&undertakeLawyer.length()!=0){
			//根据承办律师姓名获得律师ID
			cn.jsj.dao.TblLawyerDAO tld=new cn.jsj.dao.TblLawyerDAO();
			int lawyerId=tld.getLawyerId(undertakeLawyer);
			result=session.createCriteria(TblCaseInfo.class)
			.add(Restrictions.eq("undertakeLawyer", lawyerId))
			 .add(Restrictions.between("caseSignTime", signTimeS, signTimeE))
			.add(Restrictions.eq("deleteLabel", 0))
			.list();
			 break;
		}

		//如果时间不为NULL
		if(signTimeS!=null&&signTimeE!=null){
			result=session.createCriteria(TblCaseInfo.class)
			 .add(Restrictions.between("caseSignTime", signTimeS, signTimeE))
			.add(Restrictions.eq("deleteLabel", 0))
			.list();
			 break;
		}

		//如果承办律师不为NULL
		if(undertakeLawyer.length()!=0){
			//根据承办律师姓名获得律师ID
			cn.jsj.dao.TblLawyerDAO tld=new cn.jsj.dao.TblLawyerDAO();
			int lawyerId=tld.getLawyerId(undertakeLawyer);
			result=session.createCriteria(TblCaseInfo.class)
			.add(Restrictions.eq("undertakeLawyer", lawyerId))
			.add(Restrictions.eq("deleteLabel", 0))
			.list();
			 break;
		}
		}
		}else{

			for(int i=0;i<2;i++){
				//合同号不为NULL
				if(contractName.length()!=0){
				 result=session.createCriteria(TblCaseInfo.class)
				 .add(Restrictions.eq("contractNumber", contractName))
				 .add(Restrictions.eq("undertakeLawyer", userId))
				.add(Restrictions.eq("deleteLabel", 0))
				.list();
				 break;
				}

				//如果时间不为NULL
				if(signTimeS!=null&&signTimeE!=null){
					result=session.createCriteria(TblCaseInfo.class)
					 .add(Restrictions.between("caseSignTime", signTimeS, signTimeE))
					 .add(Restrictions.eq("undertakeLawyer", userId))
					.add(Restrictions.eq("deleteLabel", 0))
					.list();
					 break;
				}
				}
		}
		// 提交事务
		tx.commit();
		session.close();
		return result.size();
	}


	/**
	 * 获得指定条件下所有的案件信息
	 * @return：案件信息队列
	 */
	public java.util.List<TblCaseInfo> getTheCaseInfo(String contractName,Date signTimeS,Date signTimeE,String undertakeLawyer,int startNumb,int totalNumb,int userId){

		org.hibernate.Session session = HBUtils.getSession();
		// 新建事务对象
		org.hibernate.Transaction tx = session.beginTransaction();
		// 开始事务
		tx.begin();
		//暂存队列
		List result=new java.util.LinkedList();

		//如果为行政人员
		if(userId==0){
		//仅仅为了被打断
		for(int i=0;i<2;i++){
		//合同号不为NULL
		if(contractName.length()!=0){
		 result=session.createCriteria(TblCaseInfo.class)
		 .add(Restrictions.eq("contractNumber", contractName))
		 .addOrder(org.hibernate.criterion.Order.desc("courtDay"))
		.add(Restrictions.eq("deleteLabel", 0))
		.setFirstResult(startNumb)
		.setMaxResults(totalNumb)
		.list();
		 break;
		}

		//如果时间不为NULL与承办律师不为NULL
		if(signTimeS!=null&&signTimeE!=null&&undertakeLawyer.length()!=0){
			//根据承办律师姓名获得律师ID
			cn.jsj.dao.TblLawyerDAO tld=new cn.jsj.dao.TblLawyerDAO();
			int lawyerId=tld.getLawyerId(undertakeLawyer);
			result=session.createCriteria(TblCaseInfo.class)
			 .add(Restrictions.between("caseSignTime", signTimeS, signTimeE))
			 .add(Restrictions.eq("undertakeLawyer", lawyerId))
			 .addOrder(org.hibernate.criterion.Order.desc("courtDay"))
			 .add(Restrictions.eq("deleteLabel", 0))
			 .setFirstResult(startNumb)
			 .setMaxResults(totalNumb)
			 .list();
			 break;
		}

		//如果时间不为NULL
		if(signTimeS!=null&&signTimeE!=null){
			result=session.createCriteria(TblCaseInfo.class)
			 .add(Restrictions.between("caseSignTime", signTimeS, signTimeE))
			 .addOrder(org.hibernate.criterion.Order.desc("courtDay"))
			 .add(Restrictions.eq("deleteLabel", 0))
			 .setFirstResult(startNumb)
		     .setMaxResults(totalNumb)
			 .list();
			 break;
		}

		//如果承办律师不为NULL
		if(undertakeLawyer.length()!=0){
			//根据承办律师姓名获得律师ID
			cn.jsj.dao.TblLawyerDAO tld=new cn.jsj.dao.TblLawyerDAO();
			int lawyerId=tld.getLawyerId(undertakeLawyer);
			result=session.createCriteria(TblCaseInfo.class)
			.add(Restrictions.eq("undertakeLawyer", lawyerId))
			.addOrder(org.hibernate.criterion.Order.desc("courtDay"))
			.add(Restrictions.eq("deleteLabel", 0))
			.setFirstResult(startNumb)
			.setMaxResults(totalNumb)
			.list();
			 break;
		}
		}
		}else{

			//为律师
			for(int i=0;i<2;i++){
			//合同号不为NULL
			if(contractName.length()!=0){
			 result=session.createCriteria(TblCaseInfo.class)
			 .add(Restrictions.eq("contractNumber", contractName))
			 .add(Restrictions.eq("undertakeLawyer", userId))
			 .addOrder(org.hibernate.criterion.Order.desc("courtDay"))
			.add(Restrictions.eq("deleteLabel", 0))
			.setFirstResult(startNumb)
			.setMaxResults(totalNumb)
			.list();
			 break;
			}

			//如果时间不为NULL
			if(signTimeS!=null&&signTimeE!=null){
				result=session.createCriteria(TblCaseInfo.class)
				 .add(Restrictions.between("caseSignTime", signTimeS, signTimeE))
				 .addOrder(org.hibernate.criterion.Order.desc("courtDay"))
				 .add(Restrictions.eq("undertakeLawyer", userId))
				 .add(Restrictions.eq("deleteLabel", 0))
				 .setFirstResult(startNumb)
			     .setMaxResults(totalNumb)
				 .list();
				 break;
			}
			}
		}
		// 提交事务
		tx.commit();
		session.close();
		return result;
	}

	/**
	 * 修改案件信息
	 * @param tci：案件信息对象
	 * @return：1 修改成功
	 */
	public int saveCaseInfo(cn.jsj.pojo.TblCaseInfo tci){
		org.hibernate.Session session = HBUtils.getSession();
		// 新建事务对象
		org.hibernate.Transaction tx = session.beginTransaction();
		// 开始事务
		tx.begin();
		session.saveOrUpdate(tci);
		// 提交事务
		tx.commit();
		session.close();
		return 1;
	}


	/**
	 * 登记案件信息
	 * @param tci：案件信息对象
	 * @return：1 修改成功
	 */
	public int registerCaseInfo(cn.jsj.pojo.TblCaseInfo tci){
		org.hibernate.Session session = HBUtils.getSession();
		// 新建事务对象
		org.hibernate.Transaction tx = session.beginTransaction();
		// 开始事务
		tx.begin();
		session.save(tci);
		// 提交事务
		tx.commit();
		session.close();
		return 1;
	}

	/**
	 * 删除案件信息
	 * @param contractId：合同号
	 * @return：1 删除成功
	 */
	public int deleteCaseInfo(String contractId){
		org.hibernate.Session session = HBUtils.getSession();
		// 新建事务对象
		org.hibernate.Transaction tx = session.beginTransaction();
		// 开始事务
		tx.begin();
		String hql="update TblCaseInfo m set m.deleteLabel=?where m.contractNumber=?";
		session.createQuery(hql)
		.setInteger(0, 1)
		.setString(1, contractId)
		.executeUpdate();
		// 提交事务
		tx.commit();
		session.close();
		return 1;
	}


	/**
	 * 结案
	 * @param contractId：合同号
	 * @param achriveDeposit:修改后的卷宗押金情况
	 * @return：1 结案成功
	 */
	public int settleCaseInfo(String contractId,int achriveDeposit){
		org.hibernate.Session session = HBUtils.getSession();
		// 新建事务对象
		org.hibernate.Transaction tx = session.beginTransaction();
		// 开始事务
		tx.begin();
		String hql="update TblCaseInfo m set m.settleLawsuit=?,m.archiveDeposit=?where m.contractNumber=?";
		session.createQuery(hql)
		.setInteger(0, 0)
		.setInteger(1, achriveDeposit)
		.setString(2, contractId)
		.executeUpdate();
		// 提交事务
		tx.commit();
		session.close();
		return 1;
	}

	/**
	 * 根据合同号获取承办律师姓名
	 * @param contractId：合同号ID
	 * @return：承办律师姓名
	 */
	public String getUnderLawyerFromContId(String contractId){

		org.hibernate.Session session = HBUtils.getSession();
		// 新建事务对象
		org.hibernate.Transaction tx = session.beginTransaction();
		// 开始事务
		tx.begin();
		String hql="select l.lawyerName from TblCaseInfo m,TblLawyer l where l.lawyerId=m.undertakeLawyer and m.contractNumber=?";
	List result=session.createQuery(hql)
		.setString(0, contractId)
		.list();
		// 提交事务
		tx.commit();
		session.close();
		//获得结果的迭代器
		 ListIterator iterator = result.listIterator();
		 String rows =(String)iterator.next();
		 return rows;
	}

	/**
	 * 获得所有合同编号队列
	 * @return：合同编号队列
	 */
	public java.util.List<cn.jsj.object.FrontContractIdSet> getContractIdSet(){
		org.hibernate.Session session = HBUtils.getSession();
		// 新建事务对象
		org.hibernate.Transaction tx = session.beginTransaction();
		// 开始事务
		tx.begin();
		String hql="select new cn.jsj.object.FrontContractIdSet(t.contractNumber) from TblCaseInfo t";
	List result=session.createQuery(hql)
		.list();
		// 提交事务
		tx.commit();
		session.close();
		 return result;
	}

	/**
	 * 查看律师业绩
	 * @param lpp：参数类：前台传来的参数
	 * @return：业绩字符串
	 */

public String lawyerPerformancelook(cn.jsj.bgtodb.LawyerPerformanceProperty lpp){

	org.hibernate.Session session = HBUtils.getSession();
	// 新建事务对象
	org.hibernate.Transaction tx = session.beginTransaction();
	// 开始事务
	tx.begin();
	//查询合同总金额
	String hql="select sum(t.caseMoney) from TblCaseInfo t where t.undertakeLawyer=? and t.caseSignTime between?and?";
	List result=session.createQuery(hql)
			.setInteger(0, lpp.getLpLawyerId())
			.setDate(1, lpp.getLpstartTime())
			.setDate(2, lpp.getLpendTime())
	.list();
	// 提交事务
	tx.commit();
	session.close();

	//合同总金额
	int contractMoney=0;
	if(result==null||result.isEmpty()){
		contractMoney=0;
	}else{
		if(result.get(0)==null){
			contractMoney=0;
		}else{
		contractMoney=Integer.parseInt(((Long)result.get(0)).toString());
		}
	}
	//付款总金额
	cn.jsj.dao.TblPayDetailDAO tpd=new cn.jsj.dao.TblPayDetailDAO();
	int payMoney=tpd.getLawyerTotalMoney(lpp);

	//提成总资金
	cn.jsj.dao.TblRoyaltyInfoDAO trid=new cn.jsj.dao.TblRoyaltyInfoDAO();
	int royaltyMoney=trid.getLawyerTotalRoyatyMoney(lpp);

	//调试信息
	 cn.jsj.utils.SysLogger.PrintInfo("合同总资金--->"+contractMoney+"付款总资金---->"+payMoney+"提成总资金----->"+royaltyMoney);

	 //拼接结果字符串
	 String resultString=contractMoney+"|"+payMoney+"|"+royaltyMoney;
	return resultString;
}


/**
 * 获取律师业绩报表信息
 * @param lcp：报表信息查看参数类
 * @return：律师业绩报表信息
 */
	public  String getLawyerChartInfo(cn.jsj.bgtodb.LawyerChartProperty lcp){


		//结果队列
		List result=new LinkedList();
		//如果用户要查询的是合同金额报表
		if(lcp.getLawyerCatalog()==1){
		org.hibernate.Session session = HBUtils.getSession();
		// 新建事务对象
		org.hibernate.Transaction tx = session.beginTransaction();
		// 开始事务
		tx.begin();
			String hql="select t.undertakeLawyer,sum(t.caseMoney) from TblCaseInfo t where t.caseSignTime between?and? group by t.undertakeLawyer";
		 result=session.createQuery(hql)
					.setDate(0, lcp.getStartTime())
					.setDate(1, lcp.getEndTime())
			.list();
		// 提交事务
		tx.commit();
		session.close();
		}else{
			//如果是提成报表信息查看
			if(lcp.getLawyerCatalog()==3){
				cn.jsj.dao.TblRoyaltyInfoDAO trid=new cn.jsj.dao.TblRoyaltyInfoDAO();
				result=trid.getLawyerRoyaltyChart(lcp);
			}else{
				//是付款情况报表
				cn.jsj.dao.TblPayDetailDAO tpdd=new cn.jsj.dao.TblPayDetailDAO();
				result=tpdd.getPayDetailChart(lcp);
			}
		}

		ListIterator iterator = result.listIterator();
		//结果字符串
		java.lang.StringBuilder resultString=new java.lang.StringBuilder();
		resultString.append("[");
		//操作律师对象类
		cn.jsj.dao.TblLawyerDAO tld=new cn.jsj.dao.TblLawyerDAO();
		//循环取出数据
		while(iterator.hasNext()){
	    Object[] rows = (Object[]) iterator.next();
	    //根据律师编号获取律师姓名
	    String lawyerName=tld.getLawyerInfoFromId(Integer.parseInt(rows[0].toString())).getLawyerName();
	    resultString.append("['"+lawyerName+"',"+rows[1].toString()+"],");
		}
		//去掉最后面一个逗号
		String chartString=resultString.substring(0, resultString.length()-1);
		chartString=chartString+"]";
		return chartString;
	}


	/**
	 * 获取案件类别报表信息
	 * @param ctcp：案件类别报表参数类
	 * @return：案件报表信息
	 */
	public String getCaseTypeChartInfo(cn.jsj.bgtodb.CaseTypeChartProperty ctcp){

		org.hibernate.Session session = HBUtils.getSession();
		// 新建事务对象
		org.hibernate.Transaction tx = session.beginTransaction();
		// 开始事务
		tx.begin();
		//查询合同总金额
		String hql="select count(*),sum(t.caseMoney) from TblCaseInfo t where t.caseType=? and t.caseSignTime between?and?";
		List result=session.createQuery(hql)
				.setInteger(0, ctcp.getCaseTypeNumber())
				.setDate(1, ctcp.getStartTime())
				.setDate(2, ctcp.getEndTime())
				.list();
		// 提交事务
		tx.commit();
		session.close();
		ListIterator iterator = result.listIterator();
		 Object[] rows = (Object[]) iterator.next();
		 //获取数量
		 int caseNumber=Integer.parseInt(rows[0].toString());
		//获取合同总金额
		 int caseMoney;
		 //如果数量为0
		 if(caseNumber==0){
			 caseMoney=0;
		 }else{
			 caseMoney=Integer.parseInt(rows[1].toString());
		 }

		//付款总金额
		cn.jsj.dao.TblPayDetailDAO tpd=new cn.jsj.dao.TblPayDetailDAO();
		int payMoney=tpd.getCaseTypeChartMoney(ctcp);

		//提成总资金
		cn.jsj.dao.TblRoyaltyInfoDAO trid=new cn.jsj.dao.TblRoyaltyInfoDAO();
		int royaltyMoney=trid.getCaseTypeChartRoyaMoney(ctcp);

		//调试信息
		 cn.jsj.utils.SysLogger.PrintInfo("合同总资金--->"+caseMoney+"付款总资金---->"+payMoney+"提成总资金----->"+royaltyMoney);

		 //拼接结果字符串
		 String resultString=caseNumber+"|"+caseMoney+"|"+payMoney+"|"+royaltyMoney;
		return resultString;
	}

	/**
	 * 获取律师自己即将要开庭的案件信息
	 * @param userId：律师ID
	 * @return：律师案件信息
	 */
public String getLawerselfCourtInfo(int userId){
	org.hibernate.Session session = HBUtils.getSession();
	// 新建事务对象
	org.hibernate.Transaction tx = session.beginTransaction();
	// 开始事务
	tx.begin();
	//获取当前时间
	Date currentTime=cn.jsj.utils.TimeDispose.getCurrentDate();
	//获取一周后的日期
	Date weakLaterTime=cn.jsj.utils.TimeDispose.getLaterWeakDay();

	String hql="select contractNumber from TblCaseInfo where undertakeLawyer=? and courtDay between?and?";
	List result=session.createQuery(hql)
				.setInteger(0, userId)
				.setDate(1, currentTime)
				.setDate(2, weakLaterTime)
				.list();
	// 提交事务
	tx.commit();
	session.close();
	//合同编号集合
	java.lang.StringBuilder contractSet=new java.lang.StringBuilder();
	ListIterator iterator = result.listIterator();
	while(iterator.hasNext()){
		contractSet.append("合同号：");
		contractSet.append(iterator.next());
		contractSet.append("   ");
	}

	String contractString=contractSet.toString();
	contractString=contractString.substring(0,contractString.length()-1);
	if(result.size()!=0){
	contractString=contractString+"   在未来一周的时间内开庭！";
	}
	return contractString;
}



		/**
		 * 获取未来一周以内将要开庭的案件信息和付款信息
		 * @return:信息
		 */
		public String getCourtPayFuture(){
			org.hibernate.Session session = HBUtils.getSession();
			// 新建事务对象
			org.hibernate.Transaction tx = session.beginTransaction();
			// 开始事务
			tx.begin();
			//获取当前时间
			Date currentTime=cn.jsj.utils.TimeDispose.getCurrentDate();
			//获取一周后的日期
			Date weakLaterTime=cn.jsj.utils.TimeDispose.getLaterWeakDay();

			//获取即将开庭的案件信息
			String hql="select c.contractNumber,t.lawyerName from TblCaseInfo c,TblLawyer t where c.undertakeLawyer=t.lawyerId and c.courtDay between?and?";
			List result=session.createQuery(hql)
						.setDate(0, currentTime)
						.setDate(1, weakLaterTime)
						.list();
			//获取即将付款的案件号
			String hql2="select c.contractNumber from TblCaseInfo c,TblCasePayPlan p where c.contractNumber=p.caseNumber  and p.casePayPlanTime between?and?";
			List result2=session.createQuery(hql2)
			.setDate(0, cn.jsj.utils.TimeDispose.getTomorrowDay())
			.setDate(1, weakLaterTime)
			.list();
			// 提交事务
			tx.commit();
			session.close();
			//合同编号集合
			java.lang.StringBuilder contractSet=new java.lang.StringBuilder();
			ListIterator iterator = result.listIterator();
			//循环取出即将开庭的案件数据
			while(iterator.hasNext()){
		    Object[] rows = (Object[]) iterator.next();
		    contractSet.append("合同号：");
		    contractSet.append(rows[0].toString()+"  ");
		    contractSet.append("承办律师为： ");
		    contractSet.append(rows[1].toString()+"  ");
			}
			if(result.size()!=0){
				contractSet.append(" 在未来一周的时间内开庭!");
			}

			//循环读取即将付款的付款情况
			ListIterator iterators = result2.listIterator();
			while(iterators.hasNext()){
				Object rows = (Object) iterators.next();
				 contractSet.append("合同号：");
				 contractSet.append(rows.toString()+"  ");
			}
			if(result2.size()!=0){
			contractSet.append(" 在未来一周的时间内要付款！");
			}
			String contractString=contractSet.toString();
			return contractString;

		}

		/**
		 * 查询一段时间内所里面的业绩情况
		 * @param et：一段时间
		 * @return：所业绩信息：比如案件合同总金额，付款情况，律师提出情况等等
		 */
		public String getOfficePerformance(cn.jsj.bgtodb.ExcerptTime et){
			org.hibernate.Session session = HBUtils.getSession();
			// 新建事务对象
			org.hibernate.Transaction tx = session.beginTransaction();
			// 开始事务
			tx.begin();
			//查询合同总金额
			String hql="select sum(t.caseMoney) from TblCaseInfo t where t.caseSignTime between?and?";
			List result=session.createQuery(hql)
					.setDate(0, et.getStartTime())
					.setDate(1, et.getEndTime())
			.list();
			// 提交事务
			tx.commit();
			session.close();

			//合同总金额
			int contractMoney=0;
			if(result==null||result.isEmpty()){
				contractMoney=0;
			}else{
				if(result.get(0)==null){
					contractMoney=0;
				}else{
				contractMoney=Integer.parseInt(((Long)result.get(0)).toString());
				}
			}
			//付款总金额
			cn.jsj.dao.TblPayDetailDAO tpd=new cn.jsj.dao.TblPayDetailDAO();
			int payMoney=tpd.getOfficePayMoney(et);

			//提成总资金
			cn.jsj.dao.TblRoyaltyInfoDAO trid=new cn.jsj.dao.TblRoyaltyInfoDAO();
			int royaltyMoney=trid.getOfficeRoyaltyMoney(et);

			//调试信息
			 cn.jsj.utils.SysLogger.PrintInfo("合同总资金--->"+contractMoney+"付款总资金---->"+payMoney+"提成总资金----->"+royaltyMoney);

			 //拼接结果字符串
			 String resultString=contractMoney+"|"+payMoney+"|"+royaltyMoney;
			return resultString;
		}
}